home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
E-Education
/
(c)ed14.d64
/
lesson 6
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
9KB
|
231 lines
10 GOTO100
50 REM <YES>
51 S=54272:FORE=STOS+28:POKEE,0:NEXT
52 POKE54296,15:POKE54277,42:POKE54278,250
53 POKE54276,23:POKE54273,23:POKE54272,191
54 FORT=1TO150:NEXT:POKE54276,32:FORT=1TO200:NEXT
55 POKE54296,0:RETURN
60 REM <N0>
61 S=54272:FORE=STOS+28:POKEE,0:NEXT
62 POKE54296,15:POKE54277,18:POKE54278,242
63 POKE54276,33:POKE54273,4:POKE54272,48
64 FORT=1TO250:NEXT:POKE54276,32:FORT=1TO300:NEXT
65 POKE54296,0:RETURN
70 REM <BLIP>
71 S=54272:FORE=STOS+28:POKEE,0:NEXT
72 POKE54296,5:POKE54277,42:POKE54278,250
73 POKE54276,23:POKE54273,23:POKE54272,191
74 FORT=1TO30:NEXT:POKE54276,32:FORT=1TO50:NEXT
75 POKE54296,0:RETURN
80 FORT=1TO500:NEXT:RETURN
81 FORT=1TO1000:NEXT:RETURN
82 FORT=1TO2000:NEXT:RETURN
83 FORT=1TO3000:NEXT:RETURN
84 FORT=1TO4000:NEXT:RETURN
85 FORT=1TO5000:NEXT:RETURN
90 GOSUB81:GOSUB70
91 PRINT"[154] [208]RESS [211][208][193][195][197][160][194][193][210][160]TO CONTINUE
92 [161]R$:[139]R$[179][177][199](32)[167]92
93 [142]
95 [153]" PEEKETTER LUCK WITH THE NEXT QUESTION.OPEN":[142]
100 [151]53280,0:[151]53281,0:[151]646,3:[151]53272,23:C[178]0:P[178]0:W[178]0:D[178]0:G[178]0
101 [153]"LOAD ATNCLOSE(null)(null)(null)CHR$CLOSEVALSTR$(null)LENATN(null)RIGHT$(null)(null)ATN(null)CLOSE(null)(null)(null)CHR$(null)ATN(null)
102 PRINT" [198][207][210] [195]64 [195][207][205][208][213][212][197][210][211]
105 [153]" WAIT";
110 [153]" WAIT";
115 [153]" (null)RACTICE (null)ROBLEMS IN ATNRITHMETIC WAIT";
120 [153]" WAIT";
125 [153]" CHR$RADE 4 (null)ART 1 WAIT";
130 [153]" WAIT";
135 [153]" (null)ESSON 6 WAIT";
140 [153]" WAIT";
145 [153]" ASCINDING STR$IFFERENCES OPEN WAIT";
150 [153]" WAIT";
155 [153]" WAIT"
160 [153]" WHC ONON"
165 [141]90
170 [153]"LOAD ATNND AWAY WE GO......."
175 [141]81:[141]50:[141]80
200 [153]"PRINT#LOAD (null)UESTION 1 WAITOPEN":Z[178]0
205 [153]" (null)ARY LIVES 47 KILOMETRES FROM HER
210 PRINT" AUNT'S HOUSE. [212]O GET THERE [205]ARY
215 [153]" RODE 42 KILOMETRES ON A BOAT.
220 PRINT" [200]OW MUCH FARTHER DID SHE HAVE TO GO? (IN KM) [159]"
225 PRINT" [145]"
230 INPUT A$
240 IFA$<>"5KM"ANDA$<>"5 KM"THEN 270
250 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
260 P=P+1:GOTO300
270 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
275 IFZ=2THENG=G+1:GOTO295
280 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
290 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO225
295 PRINT"[145][145] [211]HE MUST GO 5[150]KM FUTHER. ":GOSUB82
297 PRINT" 47 - 42 = 5 ":GOSUB82:GOSUB90
300 PRINT"[152][147] [209]UESTION 2 [146][159]":Z=0
305 PRINT" [194]EN IS SAVING MONEY TO BUY A SEVEN
310 [153]" DOLLAR BASEBALL. LEFT$E HAS ALREADY
315 PRINT" SAVED ONE DOLLAR AND 50 CENTS."
317 PRINT" [200]OW MUCH MORE DOES HE NEED?[159]"
320 GOSUB81:GOSUB70
325 PRINT" [145]"
330 INPUT A$
340 IFA$<>"$5.50"THEN 370
350 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
360 P=P+1:GOTO400
370 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
375 IFZ=2 THEN G=G+1:GOTO395
380 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
390 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO325
395 PRINT"[145][145] [194]EN NEEDS $5.50[150] MORE. ":GOSUB82
397 PRINT" 7.00 - 1.50 = 5.50 ":GOSUB82:GOSUB90
400 PRINT"[152][147] [209]UESTION 3 [146][159]":Z=0
405 PRINT" [193] CLASS HAS WRITTEN 18 OF THE 25
410 [153]" SPELLING WORDS IN A TEST.
415 PRINT" [200]OW MANY WORDS HAVE THEY YET TO WRITE?[159]"
420 GOSUB81:GOSUB70
425 PRINT" [145]"
430 INPUT A$
440 IFA$<>"7"THEN 470
450 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
460 P=P+1:GOTO500
470 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
475 IFZ=2THENG=G+1:GOTO495
480 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
490 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO425
495 PRINT"[145][145] [212]HEY MUST WRITE 7[150] MORE WORDS. ":GOSUB82
497 PRINT" 25 - 18 = 7 ":GOSUB82:GOSUB90
500 PRINT"[152][147] [209]UESTION 4 [146][159]":Z=0
505 PRINT" [201]N A CLASSROOM THAT HAS 48 DESKS
510 [153]" THERE ARE 37 CHIDREN PRESENT.
515 PRINT" [200]OW MANY MORE CHILDREN CAN BE SEATED AT THE DESKS?[159]"
520 GOSUB81:GOSUB70
525 PRINT" [145]"
530 INPUT A$
540 IFA$<>"11"THEN 570
550 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
560 P=P+1:GOTO600
570 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
575 IFZ=2THENG=G+1:GOTO595
580 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
590 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO525
595 PRINT"[145][145] [212]HERE CAN BE 11[150] MORE CHILDREN. ":GOSUB82
597 PRINT" 48 - 37 = 11 ":GOSUB82:GOSUB90
600 PRINT"[152][147] [209]UESTION 5 [146][159]":Z=0
605 PRINT" [193] CLASS HAS GONE 15 DAYS WITHOUT HAVING ANYONE LATE.
610 [153]" LEFT$OW MUCH LONGER MUST THEY KEEP UP
615 PRINT" THIS RECORD TO FINISH A MONTH OF
617 [153]" 22 SCHOOL DAYS?OPEN"
620 [141]81:[141]70
625 [153]" ON"
630 [133] A$
640 [139]A$[179][177]"7"[175]A$[179][177]"7 DAYS" [167] 670
650 [153]"SYS LEN(null)(null)(null)VALLEN(null)!! WAITOPEN":[141]50:[141]82
660 P[178]P[170]1:[137]700
670 [153]"DEF (null)(null)LENLEFT$! .......... (null)HAT LEFT$(null)(null)(null)!":[141]60:[141]82:Z[178]Z[170]1
675 [139]Z[178]2[167]G[178]G[170]1:[137]695
680 [153]"ON (null)RY AGAIN ":[141]70:[141]81:W[178]W[170]1
690 [153]"OPENONON ONONONONONONON":[137]625
695 [153]"ONON (null)HEY MUST GO 7DEF DAYS MORE. ":[141]82
697 [153]" 22 - 15 = 7 ":[141]82:[141]90
700 [153]"PRINT#LOAD (null)UESTION 6 WAITOPEN":Z[178]0
705 [153]" MID$ACK HAS 63 CENTS. LEFT$E CAN PUT HIS
710 PRINT" MONEY IN THE BANK WHEN HE HAS A DOLLAR.
715 [153]" LEFT$OW MUCH MORE WILL MID$ACK HAVE TO SAVE TO DO THIS?OPEN"
720 [141]81:[141]70
725 [153]" ON"
730 [133] A$
740 [139]A$[179][177]"37"[175]A$[179][177]"37 CENTS"[167] 770
750 [153]"SYS LEN(null)(null)(null)VALLEN(null)!! WAITOPEN":[141]50:[141]82
760 P[178]P[170]1:[137]800
770 [153]"DEF (null)(null)LENLEFT$! .......... (null)HAT LEFT$(null)(null)(null)!":[141]60:[141]82:Z[178]Z[170]1
775 [139]Z[178]2[167] G[178]G[170]1:[137]795
780 [153]"ON (null)RY AGAIN ":[141]70:[141]81:W[178]W[170]1
790 [153]"OPENONON ONONONONONONON":[137]725
795 [153]"ONON LEFT$E MUST SAVE 37DEF CENTS. ":[141]82
797 [153]" 100 - 63 = 37 ":[141]82:[141]90
800 [153]"PRINT#LOAD (null)UESTION 7 WAITOPEN":Z[178]0
805 [153]" ATN BUS SEATS 60 PEOPLE. MID$OE HAS
810 PRINT" COUNTED 43 PEOPLE ON THE BUS.
815 [153]" LEFT$OW MANY MORE PEOPLE CAN GET INTO
817 PRINT" THE BUS BEFORE IT IS FULL?[159]"
820 GOSUB81:GOSUB70
825 PRINT" [145]"
830 INPUT A$
840 IFA$<>"17"THEN 870
850 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
860 P=P+1:GOTO900
870 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
875 IFZ=2THEN G=G+1:GOTO895
880 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
890 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO825
895 PRINT"[145][145] [212]HE BUS CAN HOLD 17[150] MORE PEOPLE.":GOSUB82
897 PRINT" 60 - 43 = 17 ":GOSUB82:GOSUB90
900 PRINT"[152][147] [209]UESTION 8 [146][159]":Z=0
905 PRINT" [208]IERRE STARTED IN A TRIP OF 95
910 [153]" KILOMETRES. PEEKY NOON HE HAD GONE 68 KILOMETRES.
915 PRINT" [200]OW FAR HAD HE TO GO TO COMPLETE THE TRIP?[159] (IN KM) "
920 GOSUB81:GOSUB70
925 PRINT" [145]"
930 INPUT A$
940 IFA$<>"27KM"ANDA$<>"27 KM"THEN 970
950 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
960 P=P+1:GOTO1000
970 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
975 IFZ=2THEN G=G+1:GOTO995
980 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
990 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO925
995 PRINT"[145][145] [200]E MUST GO 27[150]KM FUTHER. ":GOSUB82
997 PRINT" 95 - 68 = 27 ":GOSUB82:GOSUB90
1000 PRINT"[152][147] [209]UESTION 9 [146][159]":Z=0
1005 PRINT" [203]IRK HAS 89 CENTS BUT HIS SISTER
1010 [153]" HAS ONLY 27 CENTS.
1015 PRINT" [200]OW MUCH MORE MONEY DOES [203]IRK HAVE THAN HIS SISTER?[159]"
1020 GOSUB81:GOSUB70
1025 PRINT" [145]"
1030 INPUT A$
1040 IFA$<>"62"ANDA$<>"62 CENTS" THEN 1070
1050 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
1060 P=P+1:GOTO1100
1070 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
1075 IFZ=2THEN G=G+1:GOTO1095
1080 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
1090 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO1025
1095 PRINT"[145][145] [200]E HAS 62[150] CENTS MORE. ":GOSUB82
1097 PRINT" 89 - 27 = 62 ":GOSUB82:GOSUB90
1100 PRINT"[152][147] [209]UESTION 10 [146][159]":Z=0
1105 PRINT" [193]FTER DRIVING 53 KILOMETRES, [208]ETER
1110 [153]" STILL HAS 17 KILOMETRES TO GO TO COMPLETE HIS TRIP.
1115 PRINT" [200]OW LONG WAS HIS TRIP?[159] (IN KM)"
1120 GOSUB81:GOSUB70
1125 PRINT" [145]"
1130 INPUT A$
1140 IFA$<>"70KM"ANDA$<>"70 KM"THEN 1170
1150 PRINT"[158] [195][207][210][210][197][195][212]!! [146][159]":GOSUB50:GOSUB82
1160 GOTO1200
1170 PRINT"[150] [207][213][195][200]! .......... [212]HAT [200][213][210][212]!":GOSUB60:GOSUB82:Z=Z+1
1175 IFZ=2THEN G=G+1:GOTO1195
1180 PRINT"[145] [212]RY AGAIN ":GOSUB70:GOSUB81:W=W+1
1190 PRINT"[159][145][145] [145][145][145][145][145][145][145]":GOTO1125
1195 PRINT"[145][145] [212]HE TRIP WAS 70[150]KM. ":GOSUB82
1197 PRINT" 53 + 17 = 70 ":GOSUB82:GOSUB90
1200 PRINT"[147] [210]EPORT [195]ARD [146]"
1205 D=W-G:C=10-W
1210 PRINT"[153] 1. [209]UESTIONS ANSWERED CORRECTLY ON FIRST TRY:
1215 [153]" ";C
1220 [153]"FOR 2. (null)UESTIONS ANSWERED CORRECTLY ON SECOND TRY:
1225 PRINT" ";D
1230 PRINT"[150] 3. [209]UESTIONS MISSED ON SECOND TRY:
1235 [153]" ";G;""
1245 [141]90
1250 [153]"SYSLOAD (null)OU HAVE A CHOICE:
1255 PRINT" [208]RESS [210] [146] TO REPEAT THIS LESSON
1260 [153]" (null)RESS (null) WAIT TO RETURN TO THE MENUOPEN"
1265 [161]R$:[139]R$[179][177]"R"[175]R$[179][177]"M"[167]1265
1270 [139]R$[178]"R"[167][140]:[137]100
1280 [153]"LOAD (null)ETURNING TO THE MENU
1285 LOAD"MENU",8
1290 RUN
1295 END
1300 REM BILL CUMBERLAND 90:10:25